<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/circle/addcircle" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>

  <div class="page">
    <div class="page-hd">
      <if condition="isset($res)">
        <h1>{$Think.lang.update}{$Think.lang.circle}</h1>
        <else />
        <h1>新增商圈</h1>
      </if>
    </div>
    <div class="form">
      <form action="{:URL('admin/Circle/addCircleManage')}" id="J_form" method="post" enctype="multipart/form-data">
        <dl class="kv">
          <input type="hidden" value="{$inseupdate}" name="inseupdate" />
          <if condition="isset($res)">
            <input type="hidden" value="{$res.circleid}" name="circleid" />
            <else />
            <input type="hidden" value="{$circleid}" name="circleid" />
          </if>
          <dt>
            <label>商圈名称：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="circlename" value="{$res.circlename}" required/>
            <span class="required">*</span>
            <div class="kv-error"></div>
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>商圈简介：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="summary" value="{$res.summary}" />
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>建立人：</label>
          </dt>
          <dd>
            用户ID:
            <input class="input-text" style="width:100px;" type="text" name="userid" value="{$res.userid}" />用户名称:
            <input class="input-text" style="width:100px;" type="text" name="username" value="{$res.username}" />
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>地理位置：</label>
          </dt>
          <dd>
            <input class="input-text" style="width:50px;" type="text" name="latitude" value="{$res.latitude}" />
            <input class="input-text" style="width:50px;" type="text" name="longitude" value="{$res.longitude}" />
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>地理名称：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="locname" value="{$res.locname}" />
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>状态：</label>
          </dt>
          <dd>
            <label>
              <input type="radio" name="status" value="2" <eq name="res.status" value="2">checked</eq>
              >公开&nbsp;</label>
            <label>
              <input type="radio" name="status" value="0" <eq name="res.status" value="0">checked</eq>
              >私密&nbsp;</label>
            <label>
              <input type="radio" name="status" value="1" <eq name="res.status" value="1">checked</eq>
              >半公开</label>
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>置顶：</label>
          </dt>
          <dd>
            <label>
              <input type="radio" name="totop" value="1" <eq name="res.totop" value="1">checked</eq>
              >是&nbsp;</label>
            <label>
              <input type="radio" name="totop" value="0" <eq name="res.totop" value="0">checked</eq>
              >否&nbsp;</label>
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>推荐到首页：</label>
          </dt>
          <dd>
            <label>
              <input type="radio" name="tohomepage" value="1" <eq name="res.tohomepage" value="1">checked</eq>
              >是&nbsp;</label>
            <label>
              <input type="radio" name="tohomepage" value="0" <eq name="res.tohomepage" value="0">checked</eq>
              >否&nbsp;</label>
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>上传图片：</label>
          </dt>
          <dd>
            <input name="filename" type="file">
          </dd>
        </dl>
            <dl class="kv">
          <dt>
            <label>选择商圈分类：</label>
          </dt>
          <dd>
             <select name="cateid" id="cateid">
              <option value="0">请选择</option>
            <volist name="catelist" id="vo">
             <option value="{$vo['_id']}" <eq name="vo._id" value="$res.cateid">selected</eq>>{$vo['znname']}</option>
           </volist>
            </select>
          </dd>
        </dl>
        <div class="actions">
          <if condition="isset($res)">
            <input class="btn btn-y" type="submit" value="{$Think.lang.update}{$Think.lang.circle}" />
            <else />
            <input class="btn btn-y" type="submit" value="{$Think.lang.add}{$Think.lang.circle}" />
          </if>
          <a href="{:URL('admin/Circle/circlelist')}" class="btn btn-n">{$Think.lang.cancel}</a>
        </div>
      </form>
    </div>

  </div>
</body>

</html>
